<!--#include file="../main/top.asp" -->
<script type="text/javascript" src="../js/ajax.js"></script>
<%levelArray = userLevel()%>
<%
id = request.QueryString("id")
sql="select * from cw_users where userId="&id
set rs = ado_query(sql)
%>
<script type="text/javascript">
$(document).ready(function(){
	levelChange();
	//collegeidChange();
	<%
	if rs("userLevel")="2" then
		echo "document.getElementById('college_line').style.display = 'block';"
	end if
	%>
});
</script>
<div class="function_title"><span class="t2"><img src="../images/dqwz.gif">当前位置：更新用户信息</span></div>
<div class="function_content">
<div class="addItem"><img src="../images/back.png"><a href="adminUsersList.asp">返回列表</a></div>
<span class="important_info">注：带*项为必填信息!</span>
<form method="post" name="adminUsersEdit" id="adminUsersEdit" action="adminUsersEdit_do.asp" onSubmit="return Validator.Validate(this,3)">
<input type="hidden" name="id" id="id" value="<%=rs("userId")%>"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="loginTable" >
  <tr>
    <td width="9%"  align="right" class="leftBg">用户名：</td>
    <td width="91%"  align="left"><%=rs("userName")%></td>
  </tr>
  <tr>
    <td align="right" class="leftBg">密码：</td>
    <td  align="left"><input type="password" name="password" id="password" /><span class="important_info">如不需修改密码，此处为空即可。</span></td>
  </tr>
   <tr>
    <td align="right" class="leftBg">重输密码：</td>
    <td  align="left"><input type="password" name="repeat_password" id="repeat_password" dataType="Repeat" to="password" msg="两次输入的密码不一致"/></td>
  </tr>
  <tr>
    <td  align="right" class="leftBg"><span class="important_info">*</span>真实姓名：</td>
    <td  align="left"><input type="text" name="realName" id="realName" dataType="Require" msg="此项不能为空" value="<%=rs("realname")%>"/></td>
  </tr>
  <tr>
    <td  align="right" class="leftBg">联系方式：</td>
    <td  align="left"><input type="text" name="telNum" id="telNum" dataType="Number" Require = "false" msg="此项必须为数字" value="<%=rs("telnum")%>"/></td>
  </tr>
  <tr>
    <td align="right" class="leftBg">用户级别：</td>
    <td align="left">
    <select name="userLevel" id="userLevel" dataType="Require" msg="此项不能为空" >
    	<option value="">未选择</option>
        <%
		if levelArray(0)="0" or levelArray(0)="1" then
			if rs("userLevel")=1 then
				echo "<option value='1' selected='selected'>校级</option>"
			else
				echo "<option value='1'>校级</option>"
			end if
		end if
		if rs("userLevel")=2 then
			echo "<option value='2' selected='selected'>院级</option>"
		else
			echo "<option value='2' >院级</option>"
		end if
		%>
    </select>
    </td>
  </tr>
   <tr>
    <td align="right" class="leftBg"><span class="important_info">*</span>可选角色：</td>
    <td align="left">
    <select name="selectRole" id="selectRole" dataType="Require" msg="此项不能为空">
    	<option value="">未选择</option>
        <%
		if rs("userLevel")="1" then
			if rs("roleCollection")="2" then
				echo "<option value='2' selected='selected'>就业管理员</option>"
			else
				echo "<option value='2' >就业管理员</option>"
			end if
		end if
		if rs("userLevel")="2" then
			if rs("roleCollection")="1" then
				echo "<option value='1' selected='selected'>学院副书记</option>"
			else
				echo "<option value='1' >学院副书记</option>"
			end if
		end if
		%>
    </select>
    </td>
  </tr>
  <tr id="college_line">
    <td align="right" class="leftBg">所管学院：</td>
    <td align="left">
    <select name="collegeid" id="collegeid" dataType="Require" msg="此项不能为空">
    	<option value="">未选择</option>
        <%
		if levelArray(0)="0" or levelArray(0)="1" then
			call showCollegeOptionListByCollegeid(levelArray(1),rs("collegeid"))
        elseif levelArray(0)="2" then
        	echo showOneCollegeOption(levelArray(1))
        end if
		%>
    </select>
    </td>
  </tr>
  
  <tr>
    <td colspan="2" align="left"><div style=" margin-left:100px;"><input type="submit" name="loginButtomStu" id="loginButtomStu" class="button" value="提交"/></div></td>
    </tr>
</table>
</form>
</div>
<%
	rs.close : set rs=nothing
	conn.close : set conn=nothing
%>
<!--#include file="../main/bottom.asp" -->
